﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.Serialization;
using HWmanagementDB;

namespace HWmanagementServer
{
    [DataContract]
    public class SubjectModel
    {
        [DataMember]
        public string neptun;
        [DataMember]
        public string name;

        public static SUBJECT toDBTable(SubjectModel sm)
        {
            return new SUBJECT() { NEPTUN = sm.neptun, NAME = sm.name };
        }

        public static SubjectModel fromDBTable(SUBJECT s)
        {
            return new SubjectModel() { neptun = s.NEPTUN, name = s.NAME };
        }
    }
}
